##
## Makefile for 42sh in /home/demesy_j/svn/quarante-deuxsh/trunk
## 
## Made by julien demesy
## Login   <demesy_j@epitech.net>
## 
## Started on  Tue Mar 13 16:07:12 2012 julien demesy
## Last update Tue Mar 13 18:51:34 2012 julien demesy
##

NAME=	ish

CC=	gcc -g
RM=	rm -f

CFLAGS=	-W -Wall
OFLAGS=

DIR=	src/

SRCS=	$(DIR)main.c		\
	$(DIR)builtins.c	\
	$(DIR)prompt.c		\
	$(DIR)env.c		\
	$(DIR)fct_list.c	\
	$(DIR)put_in_list.c	\
	$(DIR)put_in_tab.c	\
	$(DIR)supp_list.c	\
	$(DIR)add_list.c	\
	$(DIR)decompose.c	\
	$(DIR)interprete.c	\
	$(DIR)parse_path.c	\
	$(DIR)execute.c

OBJS=	$(SRCS:.c=.o)

LIB=	
INCLUDE=	-I inc

$(NAME):	$(OBJS)
	$(CC) $(OBJS) -o $(NAME) $(CFLAGS) $(OFLAGS) $(INCLUDE) $(LIB)

all:	$(NAME)

$(OBJS):	$(SRCS)
	$(CC) -c $(SRCS) $(CFLAGS) $(OFLAGS) $(INCLUDE) $(LIB)
	@mv *.o $(DIR)

clean:
	@$(RM) $(OBJS)

fclean:	clean
	@$(RM) $(NAME)

re:	fclean all

debug:
	$(CC) -c $(SRCS) $(CFLAGS) $(OFLAGS) $(INCLUDE) $(LIB) -g
	@mv *.o $(DIR)
	$(CC) $(OBJS) -o $(NAME) $(CFLAGS) $(OFLAGS) $(INCLUDE) $(LIB) -g
